package com.oneplus.network.ehcacheManager;

import com.oneplus.network.proto.InesvMessage;
import org.springframework.stereotype.Component;

import java.util.concurrent.ConcurrentLinkedQueue;

@Component
public class SendTransactionManger {
    private ConcurrentLinkedQueue<InesvMessage.Message> messageConcurrentLinkedQueue = new ConcurrentLinkedQueue<>();

    public void sendTransaction(InesvMessage.Message message){
        this.messageConcurrentLinkedQueue.add(message);
    }

    public InesvMessage.Message popTransaction(){
        return this.messageConcurrentLinkedQueue.poll();
    }


}
